home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / gb2 / patch1c < prev    next >
Encoding:
Internet Message Format  |  1989-09-18  |  52.6 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i028:  GB2 - Galactic Bloodshed, an empire-like war game [Ver. 1.0], Patch1c
  5. Message-ID: <4577@tekred.CNA.TEK.COM>
  6. Date: 15 Sep 89 15:27:54 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2007
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: VANCLEEF@mps.ohio-state.edu
  12. Posting-number: Volume 8, Issue 28
  13. Archive-name: GB2/Patch1c
  14. Patch-To: GB2: Volume 7, Issue 44-51
  15.  
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 3 (of 4)."
  24. # Contents:  patches01c
  25. # Wrapped by billr@saab on Fri Sep 15 08:34:48 1989
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. if test -f 'patches01c' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'patches01c'\"
  29. else
  30. echo shar: Extracting \"'patches01c'\" \(50119 characters\)
  31. sed "s/^X//" >'patches01c' <<'END_OF_FILE'
  32. X*** ../../GB2/load.c    Thu Jul  6 07:18:13 1989
  33. X--- load.c    Fri Sep 15 07:28:12 1989
  34. X***************
  35. X*** 41,47 ****
  36. X      if (!getship(load_shdata,&s,shipno)) {
  37. X      load_handler();
  38. X      }
  39. X!     if (s->owner!=Playernum || s->is_dead) {
  40. X      DontOwnErr(shipno);
  41. X      printf("(%d)\n",s->owner);
  42. X      free(s);
  43. X--- 41,47 ----
  44. X      if (!getship(load_shdata,&s,shipno)) {
  45. X      load_handler();
  46. X      }
  47. X!     if (s->owner!=Playernum || !s->is_alive) {
  48. X      DontOwnErr(shipno);
  49. X      printf("(%d)\n",s->owner);
  50. X      free(s);
  51. X***************
  52. X*** 64,78 ****
  53. X  
  54. X      proc = 0;
  55. X  
  56. X!     if (s->type == OTYPE_TRANSDEV && s->orders.object.number > 0) {
  57. X!     Locks(1);
  58. X!     if (!getship(load_shdata,&s2, s->orders.object.number)) {
  59. X          printf("The hopper seems to be blocked.\n");
  60. X          load_handler();
  61. X      }
  62. X-     Locks(0);
  63. X  
  64. X!     if (s2->is_dead) {
  65. X          printf("The target device does not exist.\n");
  66. X          load_handler();
  67. X      }
  68. X--- 64,76 ----
  69. X  
  70. X      proc = 0;
  71. X  
  72. X!     if (s->type == OTYPE_TRANSDEV && s->object.number > 0) {
  73. X!     if (!getship(load_shdata,&s2, s->object.number)) {
  74. X          printf("The hopper seems to be blocked.\n");
  75. X          load_handler();
  76. X      }
  77. X  
  78. X!     if (!s2->is_alive) {
  79. X          printf("The target device does not exist.\n");
  80. X          load_handler();
  81. X      }
  82. X***************
  83. X*** 101,109 ****
  84. X      if (s->whatdest==LEVEL_PLAN)
  85. X          printf("Ship #%d at %.0f,%.0f\n", shipno,s->xpos, s->ypos);
  86. X      else {
  87. X!         Locks(1);
  88. X!         if (!getship(load_shdata, &s2, s->destshipno) || s2->is_dead ||
  89. X!             !(s2->is_docked && s2->whatdest==LEVEL_SHIP 
  90. X                && s2->destshipno==shipno) ) {
  91. X                  /* the ship it was docked with died or
  92. X                     undocked with it or something. */
  93. X--- 99,108 ----
  94. X      if (s->whatdest==LEVEL_PLAN)
  95. X          printf("Ship #%d at %.0f,%.0f\n", shipno,s->xpos, s->ypos);
  96. X      else {
  97. X!         if (!getship(load_shdata, &s2, s->destshipno) 
  98. X!             || !s2->is_alive 
  99. X!             || !s->object.number4 &&
  100. X!               !(s2->is_docked && s2->whatdest==LEVEL_SHIP 
  101. X                && s2->destshipno==shipno) ) {
  102. X                  /* the ship it was docked with died or
  103. X                     undocked with it or something. */
  104. X***************
  105. X*** 115,121 ****
  106. X              printf("ship #%u is not docked.\n", s->destshipno);
  107. X              load_handler();
  108. X          }
  109. X-         Locks(0);
  110. X          printf("Ship #%d docked with %s #%d\n", shipno, 
  111. X                  Shipnames[s2->type], s->destshipno);
  112. X          sh = 1;
  113. X--- 114,119 ----
  114. X***************
  115. X*** 359,366 ****
  116. X  
  117. X      putship(load_shdata,s,shipno);
  118. X  
  119. X!         if (s->type==OTYPE_TRANSDEV && s->orders.object.number > 0) {
  120. X  
  121. X         printf("Zap\007!\n");
  122. X  
  123. X             /* send stuff to other ship (could be transport device) */
  124. X--- 357,364 ----
  125. X  
  126. X      putship(load_shdata,s,shipno);
  127. X  
  128. X!         if (s->type==OTYPE_TRANSDEV && s->object.number > 0) {
  129. X  
  130. X         printf("Zap\007!\n");
  131. X  
  132. X             /* send stuff to other ship (could be transport device) */
  133. X***************
  134. X*** 412,418 ****
  135. X           if (s2->owner!=s->owner) {
  136. X         teleg_add("", telegram_buf);
  137. X         teleg_add("BULLETIN!\n\n Audio-vibatory-physio-molecular transport device #",telegram_buf);
  138. X!        sprintf(buf,"%d just gave your ship #%d the following:\n", shipno, s->orders.object.number);
  139. X         teleg_add(buf,telegram_buf);
  140. X         teleg_add(bufr,telegram_buf);
  141. X         teleg_add(bufd,telegram_buf);
  142. X--- 410,416 ----
  143. X           if (s2->owner!=s->owner) {
  144. X         teleg_add("", telegram_buf);
  145. X         teleg_add("BULLETIN!\n\n Audio-vibatory-physio-molecular transport device #",telegram_buf);
  146. X!        sprintf(buf,"%d just gave your ship #%d the following:\n", shipno, s->object.number);
  147. X         teleg_add(buf,telegram_buf);
  148. X         teleg_add(bufr,telegram_buf);
  149. X         teleg_add(bufd,telegram_buf);
  150. X***************
  151. X*** 422,428 ****
  152. X           }
  153. X  
  154. X          putship(load_shdata,s,shipno);
  155. X!        putship(load_shdata, s2, s->orders.object.number);
  156. X  
  157. X  
  158. X      } else if (sh) {
  159. X--- 420,426 ----
  160. X           }
  161. X  
  162. X          putship(load_shdata,s,shipno);
  163. X!        putship(load_shdata, s2, s->object.number);
  164. X  
  165. X  
  166. X      } else if (sh) {
  167. X***************
  168. X*** 454,460 ****
  169. X           if (s2->owner!=s->owner) {
  170. X         teleg_add("", telegram_buf);
  171. X         teleg_add("BULLETIN!\n\n Audio-vibatory-physio-molecular transport device #",telegram_buf);
  172. X!        sprintf(buf,"%d just gave your ship #%d the following:\n", shipno, s->orders.object.number);
  173. X         teleg_add(buf,telegram_buf);
  174. X         teleg_add(bufr,telegram_buf);
  175. X         teleg_add(bufd,telegram_buf);
  176. X--- 452,458 ----
  177. X           if (s2->owner!=s->owner) {
  178. X         teleg_add("", telegram_buf);
  179. X         teleg_add("BULLETIN!\n\n Audio-vibatory-physio-molecular transport device #",telegram_buf);
  180. X!        sprintf(buf,"%d just gave your ship #%d the following:\n", shipno, s->object.number);
  181. X         teleg_add(buf,telegram_buf);
  182. X         teleg_add(bufr,telegram_buf);
  183. X         teleg_add(bufd,telegram_buf);
  184. X*** ../../GB2/makeplanet.c    Wed Jul  5 15:15:31 1989
  185. X--- makeplanet.c    Fri Sep 15 07:28:14 1989
  186. X***************
  187. X*** 69,75 ****
  188. X      s = &Sector(planet,x,y);
  189. X      s->des = DES_GAS;    /* for gasgiant */
  190. X      s->fert = int_rand(35,55);
  191. X!     s->resource = int_rand(3,20);
  192. X       }
  193. X   if (planet.Maxx > MAP_GASGIANT_BANDMIN) {
  194. X      int nbands;
  195. X--- 69,75 ----
  196. X      s = &Sector(planet,x,y);
  197. X      s->des = DES_GAS;    /* for gasgiant */
  198. X      s->fert = int_rand(35,55);
  199. X!     s->resource = int_rand(20,40);
  200. X       }
  201. X   if (planet.Maxx > MAP_GASGIANT_BANDMIN) {
  202. X      int nbands;
  203. X***************
  204. X*** 79,86 ****
  205. X       for (x=0; x<planet.Maxx; x++) {
  206. X      s = &Sector(planet,x,y);
  207. X      s->des = DES_SEA;    /* make random bands of water */
  208. X!     s->fert += int_rand(10,24);
  209. X!     s->resource += int_rand(30,40);
  210. X       }
  211. X      }
  212. X      for (i=0; i<=MAP_ISLANDS*2; i++) {
  213. X--- 79,86 ----
  214. X       for (x=0; x<planet.Maxx; x++) {
  215. X      s = &Sector(planet,x,y);
  216. X      s->des = DES_SEA;    /* make random bands of water */
  217. X!     s->fert += int_rand(20,30);
  218. X!     s->resource += int_rand(40,60);
  219. X       }
  220. X      }
  221. X      for (i=0; i<=MAP_ISLANDS*2; i++) {
  222. X***************
  223. X*** 88,94 ****
  224. X       x=int_rand(1,planet.Maxx-2);
  225. X      s = &Sector(planet,x,y);
  226. X      s->des = DES_SEA;    /* make random spots of water */
  227. X!     s->fert += int_rand(12,24);
  228. X      }
  229. X   } else {
  230. X      for (i=0; i<MAP_ISLANDS*2; i++) {
  231. X--- 88,94 ----
  232. X       x=int_rand(1,planet.Maxx-2);
  233. X      s = &Sector(planet,x,y);
  234. X      s->des = DES_SEA;    /* make random spots of water */
  235. X!     s->fert += int_rand(20,30);
  236. X      }
  237. X   } else {
  238. X      for (i=0; i<MAP_ISLANDS*2; i++) {
  239. X***************
  240. X*** 100,106 ****
  241. X          s->fert = int_rand(10,21);
  242. X      } else {
  243. X          s->des=DES_SEA;
  244. X!         s->fert=int_rand(10,22);
  245. X      }
  246. X      }
  247. X    Smashup(&planet,int_rand(2,4),DES_SEA,0,0,0);
  248. X--- 100,106 ----
  249. X          s->fert = int_rand(10,21);
  250. X      } else {
  251. X          s->des=DES_SEA;
  252. X!         s->fert=int_rand(20,30);
  253. X      }
  254. X      }
  255. X    Smashup(&planet,int_rand(2,4),DES_SEA,0,0,0);
  256. X*** ../../GB2/map.c    Wed Jul  5 15:15:33 1989
  257. X--- map.c    Fri Sep 15 07:28:16 1989
  258. X***************
  259. X*** 3,13 ****
  260. X--- 3,21 ----
  261. X   *  map.c -- display sector map of current planet
  262. X   */
  263. X  
  264. X+ #define S_X (stdscr->_maxx - NAMESIZE)
  265. X+ #define S_Y (stdscr->_maxy - 1)
  266. X+ #define Midx ((S_X - NAMESIZE)/2.0)
  267. X+ #define Midy (S_Y /2.0)
  268. X+ 
  269. X  #include "vars.h"
  270. X  #include "ships.h"
  271. X  #include "races.h"
  272. X+ #include <curses.h>
  273. X  extern float compatibility();
  274. X+ int owned();
  275. X  char desshow();
  276. X+ char Digits[]={'0','1','2','3','4','5','6','7','8','9'};
  277. X  
  278. X  map(APcount, argn,args)
  279. X  int APcount;
  280. X***************
  281. X*** 18,38 ****
  282. X  planettype *p;
  283. X  placetype where;
  284. X  
  285. X!    Locks(1);
  286. X     where = Getplace(args[1],0);
  287. X!    Locks(0);
  288. X     if (where.err) return;
  289. X  
  290. X     if (where.level==LEVEL_PLAN) {
  291. X        openpdata(&map_pdata);
  292. X-        Locks(1);
  293. X        getplanet(map_pdata,&p,Stars[where.snum]->planetpos[where.pnum]);
  294. X-        Locks(0);
  295. X        close(map_pdata);
  296. X! 
  297. X        show_map(p,1);    /* 1 means display data */
  298. X  
  299. X        free(p);
  300. X  
  301. X      if (Stars[where.snum]->stability > 50)
  302. X          printf("WARNING! This planet's primary is unstable.\n");
  303. X--- 26,46 ----
  304. X  planettype *p;
  305. X  placetype where;
  306. X  
  307. X! 
  308. X     where = Getplace(args[1],0);
  309. X! 
  310. X     if (where.err) return;
  311. X  
  312. X     if (where.level==LEVEL_PLAN) {
  313. X+   
  314. X        openpdata(&map_pdata);
  315. X        getplanet(map_pdata,&p,Stars[where.snum]->planetpos[where.pnum]);
  316. X        close(map_pdata);
  317. X!  
  318. X        show_map(p,1);    /* 1 means display data */
  319. X  
  320. X        free(p);
  321. X+     printf("\n      `%s' \n\n",Stars[where.snum]->pnames[where.pnum]);
  322. X  
  323. X      if (Stars[where.snum]->stability > 50)
  324. X          printf("WARNING! This planet's primary is unstable.\n");
  325. X***************
  326. X*** 50,59 ****
  327. X  planettype *p;
  328. X  register int show;
  329. X  {
  330. X! register int x,y,i,f;
  331. X  int sh,iq,map_sectdata,map_shdata;
  332. X  shiptype *s;
  333. X! char shiplocs[MAX_X][MAX_Y];
  334. X  
  335. X    bzero((char *)shiplocs, sizeof(shiplocs));
  336. X  
  337. X--- 58,67 ----
  338. X  planettype *p;
  339. X  register int show;
  340. X  {
  341. X! register int x,y,i,f,address,owned1;
  342. X  int sh,iq,map_sectdata,map_shdata;
  343. X  shiptype *s;
  344. X! char shiplocs[MAX_X][MAX_Y],dummy;
  345. X  
  346. X    bzero((char *)shiplocs, sizeof(shiplocs));
  347. X  
  348. X***************
  349. X*** 62,68 ****
  350. X    close(map_sectdata);
  351. X  
  352. X    openshdata(&map_shdata);
  353. X-   Locks(1);
  354. X     /* traverse ship list on planet. */
  355. X    sh = p->ships;
  356. X      iq = 0;
  357. X--- 70,75 ----
  358. X***************
  359. X*** 79,85 ****
  360. X    sh = p->ships;
  361. X    while (sh) {
  362. X        (void)getship(map_shdata,&s, sh);
  363. X!       if (!s->is_dead && s->is_docked && s->whatdest==LEVEL_PLAN &&
  364. X          s->xpos < p->Maxx && s->xpos >= 0 &&
  365. X          s->ypos < p->Maxy && s->ypos >= 0 &&
  366. X          ( (s->owner == Playernum) || (iq == 1) ) )
  367. X--- 86,92 ----
  368. X    sh = p->ships;
  369. X    while (sh) {
  370. X        (void)getship(map_shdata,&s, sh);
  371. X!       if (s->is_alive && s->is_docked && s->whatdest==LEVEL_PLAN &&
  372. X          s->xpos < p->Maxx && s->xpos >= 0 &&
  373. X          s->ypos < p->Maxy && s->ypos >= 0 &&
  374. X          ( (s->owner == Playernum) || (iq == 1) ) )
  375. X***************
  376. X*** 87,161 ****
  377. X        sh = s->nextship;
  378. X        free(s);
  379. X    }
  380. X-   Locks(0);
  381. X    close(map_shdata);
  382. X  
  383. X  
  384. X!   printf("   ");
  385. X!   for (x=0; x<p->Maxx; x++) 
  386. X!     printf("%d",x/10);
  387. X!   if (show)
  388. X!       printf("  Sects %s: %d", Race->Thing ? "covered" : "owned", 
  389. X              p->info[Playernum-1].numsectsowned);
  390. X!   printf("\n   ");
  391. X!   for (x=0; x<p->Maxx; x++) 
  392. X!     printf("%d",x%10);
  393. X!   if (show) { 
  394. X!     int i,f=0;
  395. X!       printf("  Aliens:");
  396. X        if (p->is_explored || Race->tech >= TECH_EXPLORE) {
  397. X            for (i=1; i<MAXPLAYERS; i++)
  398. X              if (p->info[i-1].numsectsowned && i!=Playernum) {
  399. X                 f=1;
  400. X!                printf("%c%d", isset(Race->atwar,i) ? '*' : ' ', i);
  401. X              }
  402. X!           if (!f) printf("(none)");
  403. X!       } else printf("???");
  404. X!   }
  405. X!   putchr('\n');
  406. X  
  407. X!   for (y=0; y<p->Maxy; y++) {
  408. X!      printf("%2d ",y);
  409. X!      for (x=0; x<p->Maxx; x++) {
  410. X!     if (shiplocs[x][y])
  411. X!         putchr(shiplocs[x][y]);
  412. X!     else
  413. X!             putchr(desshow(p, x, y));
  414. X!      }
  415. X!      if (show)
  416. X!        switch (y) {    /* give stockpile info */
  417. X!         case 0: printf("| Combat readiness:  %u", p->info[Playernum-1].comread);
  418. X!           break;
  419. X!         case 1: printf("| Compatibility:   %.2f%s",compatibility(p,Race),
  420. X!             p->conditions[TOXIC] > 50 ? "(TOXIC)" : "");
  421. X!           break;
  422. X!         case 3:printf("| Resource stockpile:%u",p->info[Playernum-1].resource);
  423. X!           break;
  424. X!         case 4: printf("| Fuel stockpile:    %u",p->info[Playernum-1].fuel);
  425. X!           break;
  426. X!         case 5:printf("| Destruct cap:      %u",p->info[Playernum-1].destruct);
  427. X!           break;
  428. X!         case 6:printf("| %s:  %u (%u)", Race->Thing ? "Tons of biomass" : 
  429. X!                 "Total Population", p->popn, p->maxpopn);
  430. X!           break;
  431. X!         /*case 7: 
  432. X!           break;
  433. X!         case 8: 
  434. X!           break;
  435. X!         case 9: 
  436. X!           break;
  437. X!         case 10: 
  438. X!           break;*/
  439. X!         default: printf("|");
  440. X!           break;
  441. X!        }
  442. X!   putchr('\n');
  443. X    }
  444. X  
  445. X- 
  446. X  }
  447. X  
  448. X  
  449. X  char desshow(p,x,y)
  450. X  register planettype *p;
  451. X  register int x,y;
  452. X--- 94,181 ----
  453. X        sh = s->nextship;
  454. X        free(s);
  455. X    }
  456. X    close(map_shdata);
  457. X  
  458. X+ clear();
  459. X  
  460. X!   for (y=0; y<2; y++){
  461. X!   for (x=0; x<p->Maxx; x++) {
  462. X!     if(y==0)address = x/10;
  463. X!     if(y==1)address = x-10 * (x/10);
  464. X!     mvaddch(y,x+3,Digits[address]);
  465. X!         }
  466. X! }
  467. X! 
  468. X!   for (y=0; y<p->Maxy; y++) {
  469. X!     address = y/10;
  470. X!     mvaddch(y+2,0,Digits[address]);
  471. X!     address = y - 10*(y/10);
  472. X!     mvaddch(y+2,1,Digits[address]);
  473. X!      for (x=0; x<p->Maxx; x++) {
  474. X!     owned1=owned(p,x,y);
  475. X!     if (shiplocs[x][y])
  476. X!         {
  477. X!         if(owned1)standout();
  478. X!         mvaddch(y+2,x+3,shiplocs[x][y]);
  479. X!         if(owned1)standend();
  480. X!         }
  481. X!     else
  482. X!         {
  483. X!         if(owned1)standout();
  484. X!             mvaddch(y+2,x+3, desshow(p,x,y));
  485. X!         if(owned1)standend();
  486. X!         }
  487. X!      }
  488. X! }
  489. X! 
  490. X!      if (show){
  491. X! 
  492. X!     move(p->Maxy+3,0);
  493. X!     printw("    Sects %s: %u", Race->Thing ? "covered" : "owned", 
  494. X              p->info[Playernum-1].numsectsowned);
  495. X!       printw("  Aliens:");
  496. X        if (p->is_explored || Race->tech >= TECH_EXPLORE) {
  497. X            for (i=1; i<MAXPLAYERS; i++)
  498. X              if (p->info[i-1].numsectsowned && i!=Playernum) {
  499. X                 f=1;
  500. X!                printw("%c%d", isset(Race->atwar,i) ? '*' : ' ', i);
  501. X              }
  502. X!           if (!f) printw("(none)");
  503. X!       } else printw("???");
  504. X  
  505. X!     move(p->Maxy+4,0);
  506. X!        printw("    Mobilization :  %d (%d)", p->info[Playernum-1].comread,
  507. X!         p->info[Playernum-1].mob_set);
  508. X!        printw("  Compatibility:   %.2f",compatibility(p,Race));
  509. X! if(p->conditions[TOXIC]>50)
  510. X!        printw("    %u percent TOXIC",p->conditions[TOXIC]);
  511. X!     move(p->Maxy+5,0);
  512. X!       printw("    Resource stockpile:%d",p->info[Playernum-1].resource);
  513. X!        printw("    Fuel stockpile:    %d",p->info[Playernum-1].fuel);
  514. X!     move(p->Maxy+6,0);
  515. X!        printw("    Destruct cap:      %d",p->info[Playernum-1].destruct);
  516. X!        printw("    %s:  %d (%d)", Race->Thing ? "Tons of biomass" : 
  517. X!                 "Total Population", p->popn, 
  518. X!         round_rand(.01*(100.-p->conditions[TOXIC])*p->maxpopn) );
  519. X    }
  520. X+     move(p->Maxy+7, 0);
  521. X+     refresh();
  522. X  
  523. X  }
  524. X+ int owned(p,x,y)
  525. X+ register planettype *p;
  526. X+ register int x,y;
  527. X+ {
  528. X+ register sectortype *s;
  529. X+ register int owned0;
  530. X  
  531. X+ owned0=0;
  532. X+ s = &Sector(*p,x,y);
  533. X  
  534. X+ if(s->owner==Playernum)owned0=1;
  535. X+ return owned0;
  536. X+ }
  537. X+ 
  538. X  char desshow(p,x,y)
  539. X  register planettype *p;
  540. X  register int x,y;
  541. X***************
  542. X*** 170,220 ****
  543. X  if (s->amoeba)
  544. X      return Shipltrs[OTYPE_AMOEBA];
  545. X  
  546. X  
  547. X-     /*  owned by you */
  548. X- if (s->owner==Playernum) {
  549. X  
  550. X-    if (Race->Thing)
  551. X-     return CHAR_OWNED_THING;
  552. X     if (s->is_wasted) 
  553. X!     return CHAR_OWNED_WASTELAND;
  554. X     switch (s->des) {
  555. X!          case DES_SEA: return CHAR_OWNED_SEA;
  556. X!          case DES_LAND: return CHAR_OWNED_LAND;
  557. X!          case DES_MOUNT: return CHAR_OWNED_MOUNT;
  558. X!          case DES_GAS: return CHAR_OWNED_GAS;
  559. X           case DES_PLATED: return CHAR_PLATED;
  560. X!          case DES_ICE: return CHAR_OWNED_ICE;
  561. X           default: return('!');
  562. X     }
  563. X  
  564. X-     /* un-owned by anybody */
  565. X- 
  566. X- } else if (!s->owner) {
  567. X-  if (!p->is_explored && Race->tech < TECH_EXPLORE) {
  568. X-     if ( !( (x>0 && (s-1)->owner==Playernum) ||
  569. X-          (x<p->Maxx-1 && (s+1)->owner==Playernum) || 
  570. X-          (y>0 && (s-p->Maxx)->owner==Playernum) ||
  571. X-          (y<p->Maxy-1 && (s+p->Maxx)->owner==Playernum) ) )
  572. X-             return CHAR_CLOAKED;
  573. X-  }
  574. X- 
  575. X-  if (s->is_wasted) 
  576. X-     return(CHAR_WASTELAND);
  577. X- 
  578. X-   switch (s->des) {
  579. X-      case DES_SEA: return(CHAR_SEA);
  580. X-      case DES_LAND: return(CHAR_LAND);
  581. X-      case DES_MOUNT: return(CHAR_MOUNT);
  582. X-      case DES_GAS: return(CHAR_GAS);
  583. X-      case DES_ICE: return CHAR_ICE;
  584. X-      case DES_PLATED: return(CHAR_PLATED);
  585. X-      default: return('!');
  586. X-   }
  587. X- 
  588. X-     /* different owner */
  589. X- 
  590. X- } else
  591. X-     return CHAR_DIFFOWNED;
  592. X  
  593. X  }
  594. X--- 190,211 ----
  595. X  if (s->amoeba)
  596. X      return Shipltrs[OTYPE_AMOEBA];
  597. X  
  598. X+    if (s->owner != Playernum && s->owner > 0)
  599. X+ /*    return CHAR_DIFFOWNED; */
  600. X+     return (Digits[s->owner % 10]);
  601. X  
  602. X  
  603. X     if (s->is_wasted) 
  604. X!     return CHAR_WASTELAND;
  605. X     switch (s->des) {
  606. X!          case DES_SEA: return CHAR_SEA;
  607. X!          case DES_LAND: return CHAR_LAND;
  608. X!          case DES_MOUNT: return CHAR_MOUNT;
  609. X!          case DES_GAS: return CHAR_GAS;
  610. X           case DES_PLATED: return CHAR_PLATED;
  611. X!          case DES_ICE: return CHAR_ICE;
  612. X           default: return('!');
  613. X     }
  614. X  
  615. X  
  616. X  }
  617. X*** ../../GB2/max.c    Wed Jul  5 15:15:34 1989
  618. X--- max.c    Fri Sep 15 07:28:18 1989
  619. X***************
  620. X*** 20,25 ****
  621. X--- 20,26 ----
  622. X  reg sectortype *p;
  623. X  float c;    /* (compatibility) */
  624. X  {
  625. X+ 
  626. X   return
  627. X      (int)(
  628. X           ( powscale(p->eff)*FACTOR_FERT_SUPPORT * p->fert + 1.0) * 
  629. X*** ../../GB2/misc.c    Wed Jul  5 15:15:35 1989
  630. X--- misc.c    Fri Sep 15 07:28:19 1989
  631. X***************
  632. X*** 18,21 ****
  633. X   return (x+5.0) / (x+10.0);
  634. X  }
  635. X  
  636. X- 
  637. X--- 18,20 ----
  638. X*** ../../GB2/moveplanet.c    Wed Jul  5 15:15:37 1989
  639. X--- moveplanet.c    Fri Sep 15 07:28:24 1989
  640. X***************
  641. X*** 48,54 ****
  642. X  
  643. X    sh = planet->ships;
  644. X    while (sh) {
  645. X!     if ( (ship = ships[sh]) && !ship->is_dead)
  646. X          /* don't do landed ships */
  647. X         if (!(ship->is_docked && ship->whatdest==LEVEL_PLAN)) {
  648. X          printf(" orb sh #%d\n",sh);
  649. X--- 48,55 ----
  650. X  
  651. X    sh = planet->ships;
  652. X    while (sh) {
  653. X!     printf("# %d\n",sh);
  654. X!     if ( (ship = ships[sh]) && ship->is_alive)
  655. X          /* don't do landed ships */
  656. X         if (!(ship->is_docked && ship->whatdest==LEVEL_PLAN)) {
  657. X          printf(" orb sh #%d\n",sh);
  658. X***************
  659. X*** 57,63 ****
  660. X         }
  661. X      sh = ship->nextship;
  662. X    }
  663. X! 
  664. X  
  665. X    planet->xpos += xadd;
  666. X    planet->ypos += yadd;
  667. X--- 58,64 ----
  668. X         }
  669. X      sh = ship->nextship;
  670. X    }
  671. X!     printf("**** \n");
  672. X  
  673. X    planet->xpos += xadd;
  674. X    planet->ypos += yadd;
  675. X*** ../../GB2/moveship.c    Wed Jul  5 15:15:38 1989
  676. X--- moveship.c    Fri Sep 15 07:28:27 1989
  677. X***************
  678. X*** 29,37 ****
  679. X  int shipno;
  680. X  shiptype *s;
  681. X  {
  682. X!  double heading,stardist,movedist,truedist,dist,xdest,ydest,sn,cs;
  683. X   char buf[200];
  684. X!  float fuse,mfactor;
  685. X   int destlevel,deststar=0,destpnum=0;
  686. X   bool move_err = 0;
  687. X   shiptype *dsh;
  688. X--- 29,37 ----
  689. X  int shipno;
  690. X  shiptype *s;
  691. X  {
  692. X!  double stardist,movedist,truedist,dist,xdest,ydest,sn,cs;
  693. X   char buf[200];
  694. X!  float fuse,mfactor,heading;
  695. X   int destlevel,deststar=0,destpnum=0;
  696. X   bool move_err = 0;
  697. X   shiptype *dsh;
  698. X***************
  699. X*** 39,48 ****
  700. X   planettype *opl,*dpl;
  701. X  
  702. X  
  703. X-  printf("moving ship #%d\n",shipno);
  704. X  
  705. X!  if (speed_rating(s) && !s->is_docked && !s->is_dead && s->whatdest!=LEVEL_UNIV) {
  706. X  
  707. X      /* subtract fuel from the ship */
  708. X     fuse = FuelConsts[s->speed] * FUEL_USE;
  709. X  
  710. X--- 39,50 ----
  711. X   planettype *opl,*dpl;
  712. X  
  713. X  
  714. X  
  715. X!  if (s->speed && !s->is_docked && s->is_alive && (s->whatdest!=LEVEL_UNIV
  716. X!         || s->navigate.on) ) {
  717. X  
  718. X+  printf("moving ship #%d\n",shipno);
  719. X+ 
  720. X      /* subtract fuel from the ship */
  721. X     fuse = FuelConsts[s->speed] * FUEL_USE;
  722. X  
  723. X***************
  724. X*** 60,71 ****
  725. X      }
  726. X      return;
  727. X     }
  728. X  
  729. X- 
  730. X  /*******   move the ship towards dest ******/
  731. X  
  732. X  
  733. X  
  734. X     switch (s->whatdest) {
  735. X        case LEVEL_STAR:
  736. X       destlevel = LEVEL_STAR;
  737. X--- 62,88 ----
  738. X      }
  739. X      return;
  740. X     }
  741. X+     if(s->navigate.turns == 0) s->navigate.on = 0; 
  742. X  
  743. X  /*******   move the ship towards dest ******/
  744. X+     if(s->navigate.on){   /* follow navigational orders */
  745. X+     heading = .0174329252*s->navigate.bearing;
  746. X+    mfactor = .01 * (100 - s->damage) * SpeedConsts[s->speed] * MoveConsts[s->whatorbits] 
  747. X+                         / (logscale((int)s->mass) );
  748. X+        s->fuel -= fuse;
  749. X+        s->mass -= fuse * MASS_FUEL;
  750. X  
  751. X+     sn = sin(heading);
  752. X+     cs = cos(heading);
  753. X+        xdest = sn * mfactor;
  754. X+        ydest = cs * mfactor;
  755. X  
  756. X+        s->xpos += xdest;
  757. X+        s->ypos -= ydest;
  758. X  
  759. X+     s->navigate.turns --;
  760. X+ 
  761. X+ } else {  /*        navigate is off            */
  762. X     switch (s->whatdest) {
  763. X        case LEVEL_STAR:
  764. X       destlevel = LEVEL_STAR;
  765. X***************
  766. X*** 102,108 ****
  767. X  /*  update new xpos,ypos */
  768. X     heading = atan2( xdest-s->xpos, 
  769. X      ((ydest - s->ypos)==0.0) ? 0.000001 : (ydest-s->ypos) );
  770. X!    mfactor = SpeedConsts[s->speed] * MoveConsts[s->whatorbits] 
  771. X                          / (logscale((int)s->mass) );
  772. X  
  773. X  
  774. X--- 119,125 ----
  775. X  /*  update new xpos,ypos */
  776. X     heading = atan2( xdest-s->xpos, 
  777. X      ((ydest - s->ypos)==0.0) ? 0.000001 : (ydest-s->ypos) );
  778. X!    mfactor = .01 * (100 - s->damage) * SpeedConsts[s->speed] * MoveConsts[s->whatorbits] 
  779. X                          / (logscale((int)s->mass) );
  780. X  
  781. X  
  782. X***************
  783. X*** 126,135 ****
  784. X  
  785. X     if (s->whatdest==LEVEL_SHIP && s->owner!=ships[s->destshipno]->owner
  786. X      && !isset(races[s->owner]->allied, ships[s->destshipno]->owner)
  787. X!           && truedist > SYSTEMSIZE*2.0) {
  788. X        /* (an allied ship lets you follow it..) */
  789. X        /* we lost sight of the destination ship. */
  790. X!       /* should change SYSTEMSIZE*2.0 to calculated gun range.. */
  791. X      s->whatdest = LEVEL_UNIV;
  792. X      teleg_add("",telegram_buf);
  793. X         sprintf(buf,"Telecomm from ship #%d at %s\n\n", 
  794. X--- 143,152 ----
  795. X  
  796. X     if (s->whatdest==LEVEL_SHIP && s->owner!=ships[s->destshipno]->owner
  797. X      && !isset(races[s->owner]->allied, ships[s->destshipno]->owner)
  798. X!           && truedist > SYSTEMSIZE*4.0) {
  799. X        /* (an allied ship lets you follow it..) */
  800. X        /* we lost sight of the destination ship. */
  801. X!       /* should change SYSTEMSIZE*1.0 to calculated gun range.. */
  802. X      s->whatdest = LEVEL_UNIV;
  803. X      teleg_add("",telegram_buf);
  804. X         sprintf(buf,"Telecomm from ship #%d at %s\n\n", 
  805. X***************
  806. X*** 246,251 ****
  807. X--- 263,270 ----
  808. X  
  809. X   }
  810. X  
  811. X+ } /* if 'destination' orders */
  812. X+ 
  813. X  }
  814. X  
  815. X  
  816. X***************
  817. X*** 263,269 ****
  818. X  int shipno;
  819. X  {
  820. X  
  821. X!  if (!s->is_dead)
  822. X      switch (s->whatorbits) {
  823. X      case LEVEL_UNIV:
  824. X          s->nextship = sdata->ships;
  825. X--- 282,288 ----
  826. X  int shipno;
  827. X  {
  828. X  
  829. X!  if (s->is_alive)
  830. X      switch (s->whatorbits) {
  831. X      case LEVEL_UNIV:
  832. X          s->nextship = sdata->ships;
  833. X*** ../../GB2/orbit.c    Wed Jul  5 15:15:41 1989
  834. X--- orbit.c    Fri Sep 15 07:28:33 1989
  835. X***************
  836. X*** 19,27 ****
  837. X--- 19,29 ----
  838. X  #define Midx ((S_X - NAMESIZE)/2.0)
  839. X  #define Midy (S_Y /2.0)
  840. X  
  841. X+ 
  842. X  #include "vars.h"
  843. X  #include "ships.h"
  844. X  #include <curses.h>
  845. X+ #include <stdio.h>
  846. X  extern char Shipltrs[];
  847. X  float Lastx, Lasty, Zoom;
  848. X  extern int God;
  849. X***************
  850. X*** 93,101 ****
  851. X         openshdata(&orbit_shdata);
  852. X  
  853. X         while (sh) {
  854. X-        Locks(1);
  855. X         (void)getship(orbit_shdata, &s, sh);
  856. X-        Locks(0);
  857. X         if (DontDispNum != sh)
  858. X           DispShip(&where, s, sh, NULL );
  859. X         sh = s->nextship;
  860. X--- 95,101 ----
  861. X***************
  862. X*** 114,122 ****
  863. X  
  864. X        for (i=0; i<Stars[where.snum]->numplanets; i++) {
  865. X       if (DontDispNum!=i) {
  866. X-        Locks(1);
  867. X         getplanet(orbit_pdata,&p,Stars[where.snum]->planetpos[i]);
  868. X-        Locks(0);
  869. X         DispPlanet(LEVEL_STAR,p,Stars[where.snum]->pnames[i],DontDispPlanets);
  870. X         free(p);
  871. X       }
  872. X--- 114,120 ----
  873. X***************
  874. X*** 129,137 ****
  875. X      if(sh = Stars[where.snum]->ships){
  876. X      openshdata(&orbit_shdata);
  877. X      while (sh) {
  878. X-        Locks(1);
  879. X         (void)getship(orbit_shdata, &s, sh);
  880. X-        Locks(0);
  881. X          if(s->owner == Playernum && s->popn) 
  882. X              iq = 1; /* you are there to sight, need a crew */
  883. X          sh = s->nextship;
  884. X--- 127,133 ----
  885. X***************
  886. X*** 145,153 ****
  887. X         openshdata(&orbit_shdata);
  888. X  
  889. X         while (sh) {
  890. X-        Locks(1);
  891. X         (void)getship(orbit_shdata, &s, sh);
  892. X-        Locks(0);
  893. X         if (DontDispNum != sh && !(s->owner != Playernum && s->type == STYPE_MINE) ) {
  894. X  
  895. X          if((s->owner == Playernum) || (iq == 1))
  896. X--- 141,147 ----
  897. X***************
  898. X*** 163,171 ****
  899. X     case LEVEL_PLAN:
  900. X  
  901. X        openpdata(&orbit_pdata);
  902. X-       Locks(1);
  903. X        getplanet(orbit_pdata,&p,Stars[where.snum]->planetpos[where.pnum]);
  904. X-       Locks(0);
  905. X        close(orbit_pdata);
  906. X        DispPlanet(LEVEL_PLAN, p, Stars[where.snum]->pnames[where.pnum], DontDispPlanets);
  907. X  
  908. X--- 157,163 ----
  909. X***************
  910. X*** 176,184 ****
  911. X      if(sh = p->ships){
  912. X      openshdata(&orbit_shdata);
  913. X      while (sh) {
  914. X-        Locks(1);
  915. X         (void)getship(orbit_shdata, &s, sh);
  916. X-        Locks(0);
  917. X          if(s->owner == Playernum && s->popn)
  918. X              iq = 1; /* you are there to sight, need a crew */
  919. X          sh = s->nextship;
  920. X--- 168,174 ----
  921. X***************
  922. X*** 192,200 ****
  923. X        if (!DontDispShips && (sh = p->ships)) {
  924. X         openshdata(&orbit_shdata);
  925. X         while (sh) {
  926. X-        Locks(1);
  927. X         (void)getship(orbit_shdata, &s, sh);
  928. X-        Locks(0);
  929. X         if (DontDispNum != sh) {
  930. X               if( !(s->is_docked && s->whatdest==LEVEL_PLAN) ) {
  931. X          if((s->owner == Playernum) || (iq ==1))
  932. X--- 182,188 ----
  933. X***************
  934. X*** 365,371 ****
  935. X  startype *star;
  936. X  int DontDispStars;
  937. X  {
  938. X!  int x,y;
  939. X   register int x2,y2;
  940. X   float fac;
  941. X   char *c;
  942. X--- 353,360 ----
  943. X  startype *star;
  944. X  int DontDispStars;
  945. X  {
  946. X! planettype *p;
  947. X!  int x,y,i,col,orbit_pdata;
  948. X   register int x2,y2;
  949. X   float fac;
  950. X   char *c;
  951. X***************
  952. X*** 372,378 ****
  953. X  
  954. X   if (level==LEVEL_UNIV) {
  955. X     fac = 1.0;
  956. X!    x = (int)(Midx+(star->xpos-Lastx)*(Midx/UNIVSIZE) / Zoom)*1.1;
  957. X     y = (int)(Midy+(star->ypos-Lasty)*(Midy/UNIVSIZE) / Zoom);
  958. X   } else if (level==LEVEL_STAR) {
  959. X     fac = 1000.0;
  960. X--- 361,367 ----
  961. X  
  962. X   if (level==LEVEL_UNIV) {
  963. X     fac = 1.0;
  964. X!    x = (int)(Midx+(star->xpos-Lastx)*(Midx/UNIVSIZE) / Zoom);
  965. X     y = (int)(Midy+(star->ypos-Lasty)*(Midy/UNIVSIZE) / Zoom);
  966. X   } else if (level==LEVEL_STAR) {
  967. X     fac = 1000.0;
  968. X***************
  969. X*** 383,392 ****
  970. X      DispArray(x, y, 11,7, Novae[star->nova_stage-1], fac);
  971. X   else if (y>=0 && y<=S_Y && x>=0 && x<=S_X) {
  972. X      move(y,x);
  973. X      addch('*');
  974. X      if (!DontDispStars) {
  975. X          move(y, x+2);
  976. X!         addstr(star->name);
  977. X      }
  978. X   }
  979. X  
  980. X--- 372,393 ----
  981. X      DispArray(x, y, 11,7, Novae[star->nova_stage-1], fac);
  982. X   else if (y>=0 && y<=S_Y && x>=0 && x<=S_X) {
  983. X      move(y,x);
  984. X+ /* check to see if any of its planets are colonized by the player */
  985. X+       openpdata(&orbit_pdata);
  986. X+     col=0;
  987. X+       for (i=0; i<star->numplanets; i++) {
  988. X+        getplanet(orbit_pdata,&p,star->planetpos[i]);
  989. X+     if(p->info[Playernum-1].numsectsowned >0) col =1;
  990. X+        free(p);
  991. X+       }
  992. X+       close(orbit_pdata);
  993. X+ 
  994. X+     if(col)standout();
  995. X      addch('*');
  996. X+     if(col)standend();
  997. X      if (!DontDispStars) {
  998. X          move(y, x+2);
  999. X!         addstr    (star->name);
  1000. X      }
  1001. X   }
  1002. X  
  1003. X***************
  1004. X*** 409,415 ****
  1005. X--- 410,418 ----
  1006. X     x = (int)(Midx +(-Lastx)*(Midx/PLORBITSIZE) / Zoom);
  1007. X   }
  1008. X   if (x>=0 && x<=S_X && y>=0 && y<=S_Y) {
  1009. X+     if(p->info[Playernum-1].numsectsowned >0)standout();
  1010. X         mvaddch(y,x,'@');
  1011. X+     standend();
  1012. X         if (!DontDispPlanets) {
  1013. X           addch(' ');
  1014. X           addstr(name);
  1015. X***************
  1016. X*** 430,480 ****
  1017. X  
  1018. X      "         ",
  1019. X      "         ",
  1020. X!     "\\===m===/",
  1021. X      "         ",
  1022. X      "         ",
  1023. X  
  1024. X!     "  |      ",
  1025. X!     "  \\\\     ",
  1026. X!     "    m    ",
  1027. X      "    \\\\   ",
  1028. X!     "      \\__",
  1029. X  
  1030. X      "     /   ",
  1031. X      "    ||   ",
  1032. X-     "    m    ",
  1033. X      "    ||   ",
  1034. X      "     \\   ",
  1035. X  
  1036. X      "       __",
  1037. X      "     //  ",
  1038. X!     "    m    ",
  1039. X!     "   //    ",
  1040. X      "   |     ",
  1041. X  
  1042. X      "         ",
  1043. X      "         ",
  1044. X!     "/===m===\\",    /* cc thinks this is a quoted " w/o the \ */
  1045. X      "         ",
  1046. X      "         ",
  1047. X  
  1048. X      "__       ",
  1049. X      "  \\\\     ",    /* weird stuff again */
  1050. X!     "    m    ",
  1051. X!     "     \\\\  ",
  1052. X!     "      |  ",
  1053. X  
  1054. X      "   \\     ",
  1055. X      "   ||    ",
  1056. X-     "    m    ",
  1057. X      "   ||    ",
  1058. X      "   /     ",
  1059. X  
  1060. X!     "      |  ",
  1061. X!     "     //  ",
  1062. X!     "    m    ",
  1063. X      "__//     ",
  1064. X      "         "
  1065. X  };
  1066. X  
  1067. X  
  1068. X--- 433,484 ----
  1069. X  
  1070. X      "         ",
  1071. X      "         ",
  1072. X!     "\\=======/",
  1073. X      "         ",
  1074. X      "         ",
  1075. X  
  1076. X!     "   |     ",
  1077. X!     "   \\     ",
  1078. X!     "   \\\\    ",
  1079. X      "    \\\\   ",
  1080. X!     "     \\\\__",
  1081. X  
  1082. X      "     /   ",
  1083. X      "    ||   ",
  1084. X      "    ||   ",
  1085. X+     "    ||   ",
  1086. X      "     \\   ",
  1087. X  
  1088. X      "       __",
  1089. X      "     //  ",
  1090. X!     "    //   ",
  1091. X!     "    /    ",
  1092. X      "   |     ",
  1093. X  
  1094. X      "         ",
  1095. X      "         ",
  1096. X!     "/=======\\",    /* cc thinks this is a quoted " w/o the \ */
  1097. X      "         ",
  1098. X      "         ",
  1099. X  
  1100. X      "__       ",
  1101. X      "  \\\\     ",    /* weird stuff again */
  1102. X!     "   \\\\    ", 
  1103. X!     "    \\\\   ",
  1104. X!     "     |   ",
  1105. X  
  1106. X      "   \\     ",
  1107. X      "   ||    ",
  1108. X      "   ||    ",
  1109. X+     "   ||    ",
  1110. X      "   /     ",
  1111. X  
  1112. X!     "     |   ",
  1113. X!     "    //   ",
  1114. X!     "   //    ",
  1115. X      "__//     ",
  1116. X      "         "
  1117. X+ 
  1118. X  };
  1119. X  
  1120. X  
  1121. X***************
  1122. X*** 490,496 ****
  1123. X   float xt,yt,slope;
  1124. X   char *c;
  1125. X  
  1126. X!  if (ship->is_dead)
  1127. X      return;
  1128. X  
  1129. X   switch (where->level) {
  1130. X--- 494,500 ----
  1131. X   float xt,yt,slope;
  1132. X   char *c;
  1133. X  
  1134. X!  if (!ship->is_alive)
  1135. X      return;
  1136. X  
  1137. X   switch (where->level) {
  1138. X***************
  1139. X*** 514,539 ****
  1140. X   switch (ship->type) {
  1141. X  
  1142. X    case STYPE_MIRROR:
  1143. X!     if (ship->orders.aimed_at.level==LEVEL_STAR) {
  1144. X!     xt = Stars[ship->orders.aimed_at.snum]->xpos;
  1145. X!     yt = Stars[ship->orders.aimed_at.snum]->ypos;
  1146. X!     } else if (ship->orders.aimed_at.level==LEVEL_PLAN) {
  1147. X      if (where->level==LEVEL_PLAN && 
  1148. X!             ship->orders.aimed_at.pnum == where->pnum) {  
  1149. X                  /* same planet */
  1150. X!         xt = Stars[ship->orders.aimed_at.snum]->xpos + pl->xpos;
  1151. X!         yt = Stars[ship->orders.aimed_at.snum]->ypos + pl->ypos;
  1152. X      } else {    /* different planet */
  1153. X          openpdata(&pdata);
  1154. X          getplanet(pdata,&apl,Stars[where->snum]->planetpos[where->pnum]);
  1155. X          close(pdata);
  1156. X!         xt = Stars[ship->orders.aimed_at.snum]->xpos + apl->xpos;
  1157. X!         yt = Stars[ship->orders.aimed_at.snum]->ypos + apl->ypos;
  1158. X          free(apl);
  1159. X      }
  1160. X!     } else if (ship->orders.aimed_at.level==LEVEL_SHIP) {
  1161. X      openshdata(&shipdata);
  1162. X!     if (getship(shipdata,&aship,ship->orders.aimed_at.shipno)) {
  1163. X          xt = aship->xpos;
  1164. X          yt = aship->ypos;
  1165. X      } else
  1166. X--- 518,543 ----
  1167. X   switch (ship->type) {
  1168. X  
  1169. X    case STYPE_MIRROR:
  1170. X!     if (ship->aimed_at.level==LEVEL_STAR) {
  1171. X!     xt = Stars[ship->aimed_at.snum]->xpos;
  1172. X!     yt = Stars[ship->aimed_at.snum]->ypos;
  1173. X!     } else if (ship->aimed_at.level==LEVEL_PLAN) {
  1174. X      if (where->level==LEVEL_PLAN && 
  1175. X!             ship->aimed_at.pnum == where->pnum) {  
  1176. X                  /* same planet */
  1177. X!         xt = Stars[ship->aimed_at.snum]->xpos + pl->xpos;
  1178. X!         yt = Stars[ship->aimed_at.snum]->ypos + pl->ypos;
  1179. X      } else {    /* different planet */
  1180. X          openpdata(&pdata);
  1181. X          getplanet(pdata,&apl,Stars[where->snum]->planetpos[where->pnum]);
  1182. X          close(pdata);
  1183. X!         xt = Stars[ship->aimed_at.snum]->xpos + apl->xpos;
  1184. X!         yt = Stars[ship->aimed_at.snum]->ypos + apl->ypos;
  1185. X          free(apl);
  1186. X      }
  1187. X!     } else if (ship->aimed_at.level==LEVEL_SHIP) {
  1188. X      openshdata(&shipdata);
  1189. X!     if (getship(shipdata,&aship,ship->aimed_at.shipno)) {
  1190. X          xt = aship->xpos;
  1191. X          yt = aship->ypos;
  1192. X      } else
  1193. X***************
  1194. X*** 543,604 ****
  1195. X      } else
  1196. X      xt = yt = 0.0;
  1197. X  
  1198. X!     slope = (xt - ship->xpos) / (yt - ship->ypos);
  1199. X  
  1200. X!     if (yt - ship->ypos > 0) {
  1201. X!     if (slope > 0) {
  1202. X!        if (slope > 1) {
  1203. X!         if (slope > 2)
  1204. X!             wm = 0;
  1205. X!         else
  1206. X!             wm = 1;
  1207. X!        } else {
  1208. X!         if (slope > .5)
  1209. X!             wm = 1;
  1210. X!         else
  1211. X!             wm = 2;
  1212. X!        }
  1213. X      } else {
  1214. X!        if (slope < -1) {
  1215. X!         if (slope < -2)
  1216. X!             wm = 0;
  1217. X!         else
  1218. X!             wm = 7;
  1219. X!        } else {
  1220. X!         if (slope < .5)
  1221. X!             wm = 7;
  1222. X!         else
  1223. X!             wm = 6;
  1224. X!        }
  1225. X!         }
  1226. X!     } else {
  1227. X!     if (slope > 0) {
  1228. X!        if (slope > 1) {
  1229. X!         if (slope > 2)
  1230. X!             wm = 4;
  1231. X!         else
  1232. X!             wm = 5;
  1233. X!        } else {
  1234. X!         if (slope > .5)
  1235. X!             wm = 5;
  1236. X!         else
  1237. X!             wm = 6;
  1238. X!        }
  1239. X!     } else {
  1240. X!        if (slope < -1) {
  1241. X!         if (slope < -2)
  1242. X!             wm = 4;
  1243. X!         else
  1244. X!             wm = 3;
  1245. X!        } else {
  1246. X!         if (slope < .5)
  1247. X!             wm = 3;
  1248. X!         else
  1249. X!             wm = 2;
  1250. X!        }
  1251. X      }
  1252. X-     }
  1253. X  
  1254. X      DispArray(x,y, 9,5, Mirror[wm], 
  1255. X              ship->whatorbits==LEVEL_UNIV ? (float)100.0 :
  1256. X              (ship->whatorbits==LEVEL_STAR ? (float)10.0 :
  1257. X--- 547,583 ----
  1258. X      } else
  1259. X      xt = yt = 0.0;
  1260. X  
  1261. X!     wm=0;
  1262. X  
  1263. X!     if(xt == ship->xpos){
  1264. X!         wm=0;
  1265. X!         if(yt > ship->ypos)wm=4;
  1266. X      } else {
  1267. X!         slope = (yt - ship->ypos) / (xt - ship->xpos);
  1268. X!         if(yt == ship->ypos){
  1269. X!             wm=6;
  1270. X!             if(xt > ship->xpos)wm=2;
  1271. X!             }
  1272. X! 
  1273. X!         if(yt > ship->ypos) {
  1274. X!             if(slope < -2.414)wm=4;
  1275. X!             if(slope > -2.414)wm=5;
  1276. X!             if(slope > -0.414)wm=6;
  1277. X!             if(slope >  0.000)wm=2;
  1278. X!             if(slope >  0.414)wm=3;
  1279. X!             if(slope >  2.414)wm=4;
  1280. X!             }
  1281. X!         if(yt < ship->ypos) {
  1282. X!             if(slope < -2.414)wm=0;
  1283. X!             if(slope > -2.414)wm=1;
  1284. X!             if(slope > -0.414)wm=2;
  1285. X!             if(slope >  0.000)wm=6;
  1286. X!             if(slope >  0.414)wm=7;
  1287. X!             if(slope >  2.414)wm=0;
  1288. X!             }
  1289. X      }
  1290. X  
  1291. X+ 
  1292. X      DispArray(x,y, 9,5, Mirror[wm], 
  1293. X              ship->whatorbits==LEVEL_UNIV ? (float)100.0 :
  1294. X              (ship->whatorbits==LEVEL_STAR ? (float)10.0 :
  1295. X***************
  1296. X*** 605,612 ****
  1297. X              (ship->whatorbits==LEVEL_PLAN ? (float)1.0 :0)));
  1298. X                  /* (magnification) */
  1299. X      if (x>=0 && x<=S_X && y>=0 && y<=S_Y) {
  1300. X          move(y,x+1);
  1301. X!         printw("%d",shipno);
  1302. X      }
  1303. X      break;
  1304. X  
  1305. X--- 584,593 ----
  1306. X              (ship->whatorbits==LEVEL_PLAN ? (float)1.0 :0)));
  1307. X                  /* (magnification) */
  1308. X      if (x>=0 && x<=S_X && y>=0 && y<=S_Y) {
  1309. X+     if(ship->owner==Playernum)standout();
  1310. X          move(y,x+1);
  1311. X!         printw("m%d",shipno);
  1312. X!         standend();
  1313. X      }
  1314. X      break;
  1315. X  
  1316. X***************
  1317. X*** 626,641 ****
  1318. X             register float fac;
  1319. X      /* make a cloud of Von Neumann machines */
  1320. X      if (ship->whatorbits!=LEVEL_UNIV || (ship->owner == Playernum || God)) {
  1321. X!     fac = ship->orders.object.number / 
  1322. X          ((ship->whatorbits==LEVEL_UNIV ? 100.0 : 
  1323. X          (ship->whatorbits==LEVEL_STAR ? 30.0 : 4.0)) * Zoom);
  1324. X!     for (n=1; n<=ship->orders.object.number && n<267; n++) {
  1325. X          xa = int_rand(x - (int)fac, x + (int)fac);
  1326. X          ya = int_rand(y - (int)(fac*S_Y/S_X),
  1327. X                    y + (int)(fac*S_Y/S_X));
  1328. X          if (xa>=0 && xa<=S_X && ya>=0 && ya<=S_Y) {
  1329. X              mvaddch(ya,xa, Shipltrs[ship->type]);
  1330. X              printw("%d",shipno);
  1331. X          }
  1332. X           }
  1333. X      }
  1334. X--- 607,624 ----
  1335. X             register float fac;
  1336. X      /* make a cloud of Von Neumann machines */
  1337. X      if (ship->whatorbits!=LEVEL_UNIV || (ship->owner == Playernum || God)) {
  1338. X!     fac = ship->object.number / 
  1339. X          ((ship->whatorbits==LEVEL_UNIV ? 100.0 : 
  1340. X          (ship->whatorbits==LEVEL_STAR ? 30.0 : 4.0)) * Zoom);
  1341. X!     for (n=1; n<=ship->object.number && n<267; n++) {
  1342. X          xa = int_rand(x - (int)fac, x + (int)fac);
  1343. X          ya = int_rand(y - (int)(fac*S_Y/S_X),
  1344. X                    y + (int)(fac*S_Y/S_X));
  1345. X          if (xa>=0 && xa<=S_X && ya>=0 && ya<=S_Y) {
  1346. X+         if(ship->owner==Playernum)standout();
  1347. X              mvaddch(ya,xa, Shipltrs[ship->type]);
  1348. X              printw("%d",shipno);
  1349. X+         standend();
  1350. X          }
  1351. X           }
  1352. X      }
  1353. X***************
  1354. X*** 646,653 ****
  1355. X--- 629,638 ----
  1356. X      /* other ships can only be seen when in system */
  1357. X      if (ship->whatorbits!=LEVEL_UNIV || (ship->owner == Playernum || God))
  1358. X         if (x>=0 && x<=S_X && y>=0 && y<=S_Y) {
  1359. X+         if(ship->owner==Playernum)standout();
  1360. X          mvaddch(y,x, Shipltrs[ship->type]);
  1361. X          printw("%d",shipno);
  1362. X+         standend();
  1363. X         }
  1364. X      break;
  1365. X   }
  1366. X*** ../../GB2/order.c    Wed Jul  5 15:15:42 1989
  1367. X--- order.c    Fri Sep 15 07:28:38 1989
  1368. X***************
  1369. X*** 33,39 ****
  1370. X  first = 1;
  1371. X  prerror = 0;
  1372. X  
  1373. X- clear(); move(0,0);
  1374. X  
  1375. X  if (argn>=2) {
  1376. X      if (args[1][0]=='#') { 
  1377. X--- 33,38 ----
  1378. X***************
  1379. X*** 84,92 ****
  1380. X    }
  1381. X  
  1382. X   }
  1383. X-     /* move to bottom of screen */
  1384. X-  move(stdscr->_maxy-2,0);
  1385. X-  refresh();
  1386. X  
  1387. X  }
  1388. X  
  1389. X--- 83,88 ----
  1390. X***************
  1391. X*** 93,103 ****
  1392. X  
  1393. X   /* various prompt locations so we don't have to remember the #'s */
  1394. X  #define Opromptx 19
  1395. X! #define Oprompty 7
  1396. X  #define Erry (Oprompty+1)
  1397. X  #define Spromptx (25+PLACENAMESIZE)
  1398. X  #define Sprompty 2
  1399. X! #define Tpromptx Spromptx
  1400. X  #define Tprompty 4
  1401. X  #define Dprompty 2
  1402. X  #define Dpromptx 15
  1403. X--- 89,100 ----
  1404. X  
  1405. X   /* various prompt locations so we don't have to remember the #'s */
  1406. X  #define Opromptx 19
  1407. X! #define Oprompty 12
  1408. X! #define Lprompty 8
  1409. X  #define Erry (Oprompty+1)
  1410. X  #define Spromptx (25+PLACENAMESIZE)
  1411. X  #define Sprompty 2
  1412. X! #define Tpromptx 15
  1413. X  #define Tprompty 4
  1414. X  #define Dprompty 2
  1415. X  #define Dpromptx 15
  1416. X***************
  1417. X*** 104,111 ****
  1418. X  #define SWprompty 5
  1419. X  #define SWpromptx 2
  1420. X  #define Bprompty 6
  1421. X  
  1422. X- 
  1423. X  int give_orders(APcount, shipno, nextship)
  1424. X  int APcount;
  1425. X  int shipno;
  1426. X--- 101,112 ----
  1427. X  #define SWprompty 5
  1428. X  #define SWpromptx 2
  1429. X  #define Bprompty 6
  1430. X+ #define Nprompty 3
  1431. X+ #define Cpromptx 18
  1432. X+ #define Trnpromptx 44
  1433. X+ #define Pprompty 7
  1434. X+ #define Ppromptx 18
  1435. X  
  1436. X  int give_orders(APcount, shipno, nextship)
  1437. X  int APcount;
  1438. X  int shipno;
  1439. X***************
  1440. X*** 116,121 ****
  1441. X--- 117,127 ----
  1442. X   int i = 0;
  1443. X   shiptype *ship, *oldship, ship2;
  1444. X   char c,s[PLACENAMESIZE];
  1445. X+ 
  1446. X+ clear(); move(0,0);
  1447. X+     /* move to bottom of screen */
  1448. X+  move(stdscr->_maxy-2,0);
  1449. X+  refresh();
  1450. X   
  1451. X   openshdata(&order_shdata);
  1452. X   if (!getship(order_shdata,&ship,shipno)) {
  1453. X***************
  1454. X*** 126,132 ****
  1455. X  
  1456. X   if (ship->owner==Playernum) {
  1457. X   
  1458. X!     if (ship->is_dead) {
  1459. X      printw("%s #%d has been destroyed.\n", Shipnames[ship->type], shipno);
  1460. X      i = 1;
  1461. X      } else {
  1462. X--- 132,138 ----
  1463. X  
  1464. X   if (ship->owner==Playernum) {
  1465. X   
  1466. X!     if (!ship->is_alive) {
  1467. X      printw("%s #%d has been destroyed.\n", Shipnames[ship->type], shipno);
  1468. X      i = 1;
  1469. X      } else {
  1470. X***************
  1471. X*** 166,172 ****
  1472. X      }
  1473. X  
  1474. X      move(0,0);
  1475. X!     printw("%13s #%-4d at '%s'. (%2d APs)",
  1476. X          Shipnames[ship->type], shipno, prin_ship_orbits(ship),
  1477. X          ship->whatorbits==LEVEL_UNIV ? Sdata.AP[Playernum] : 
  1478. X          Stars[ship->storbits]->AP[Playernum]);
  1479. X--- 172,181 ----
  1480. X      }
  1481. X  
  1482. X      move(0,0);
  1483. X!     standout();
  1484. X!     printw(" %s ",ship->name);
  1485. X!     standend();
  1486. X!     printw("  (%s) #%-4d at '%s'. (%2d APs)",
  1487. X          Shipnames[ship->type], shipno, prin_ship_orbits(ship),
  1488. X          ship->whatorbits==LEVEL_UNIV ? Sdata.AP[Playernum] : 
  1489. X          Stars[ship->storbits]->AP[Playernum]);
  1490. X***************
  1491. X*** 181,211 ****
  1492. X              printw("(s)peed: %d\n",ship->speed);
  1493. X          }
  1494. X      }
  1495. X      if (can_aim(ship)) {
  1496. X          was_obj = 1;
  1497. X          move(4,0);
  1498. X             printw("(a)imed at: %s", prin_aimed_at(ship));
  1499. X          if (ship->type==STYPE_MIRROR)
  1500. X!           printw("\n (i)ntensity: %3d",ship->orders.aimed_at.intensity);
  1501. X      } else if (ship->type==OTYPE_TRANSDEV) {
  1502. X          move(Tprompty,Tpromptx-18);
  1503. X!         printw("(t)arget  ship   #%d", ship->orders.object.number);
  1504. X      } else if (ship->type==STYPE_MINE) {
  1505. X          move(Tprompty,Tpromptx-18);
  1506. X!         printw("(t)rigger radius: %d", ship->orders.object.number);
  1507. X      } else if (can_bombard(ship)) {
  1508. X          was_obj = 0;
  1509. X          move(Bprompty,0); clrtoeol();
  1510. X!         if (ship->orders.o.bombard)
  1511. X             if (ship->whatdest==LEVEL_PLAN)
  1512. X!             printw("(b)OMBARD planet %s", 
  1513. X                  ship->whatdest==LEVEL_PLAN ? 
  1514. X                  prin_ship_dest(ship) : "" );
  1515. X             else
  1516. X!             printw("(b)OMBARD ON (no planet specified)");
  1517. X          else
  1518. X              printw("(b)ombard off");
  1519. X      }
  1520. X      if (has_switch(ship)) {
  1521. X          move(SWprompty,SWpromptx);
  1522. X          printw("(o)%s", ship->on ? "n" : "ff");
  1523. X--- 190,254 ----
  1524. X              printw("(s)peed: %d\n",ship->speed);
  1525. X          }
  1526. X      }
  1527. X+     if (can_navigate(ship)) {
  1528. X+         move(3,0); clrtoeol();
  1529. X+         if (ship->navigate.on)
  1530. X+             printw("(n)avigate on:   (c)ourse %3u    (#) of turns %3u",
  1531. X+                 ship->navigate.bearing,
  1532. X+                 ship->navigate.turns);
  1533. X+         else
  1534. X+             printw("(n)avigate off");    
  1535. X+         }
  1536. X      if (can_aim(ship)) {
  1537. X          was_obj = 1;
  1538. X          move(4,0);
  1539. X             printw("(a)imed at: %s", prin_aimed_at(ship));
  1540. X          if (ship->type==STYPE_MIRROR)
  1541. X!           printw("\n (i)ntensity: %3d",ship->aimed_at.intensity);
  1542. X      } else if (ship->type==OTYPE_TRANSDEV) {
  1543. X          move(Tprompty,Tpromptx-18);
  1544. X!         printw("(t)arget  ship   #%d", ship->object.number);
  1545. X      } else if (ship->type==STYPE_MINE) {
  1546. X          move(Tprompty,Tpromptx-18);
  1547. X!         printw("(t)rigger radius: %d", ship->object.number);
  1548. X!         move(Tprompty+1,Tpromptx-18);
  1549. X!         if(!ship->mine.mode)printw("(m)ode: radiation");
  1550. X!         if(ship->mine.mode)printw("(m)ode: explosive");
  1551. X      } else if (can_bombard(ship)) {
  1552. X          was_obj = 0;
  1553. X          move(Bprompty,0); clrtoeol();
  1554. X!         if (ship->bombard)
  1555. X             if (ship->whatdest==LEVEL_PLAN)
  1556. X!             printw("(b)ombard planet %s", 
  1557. X                  ship->whatdest==LEVEL_PLAN ? 
  1558. X                  prin_ship_dest(ship) : "" );
  1559. X             else
  1560. X!             printw("(b)ombard on (no planet specified)");
  1561. X          else
  1562. X              printw("(b)ombard off");
  1563. X      }
  1564. X+     if (can_bombard(ship) || ship->type==OTYPE_GR) {
  1565. X+         move(Pprompty,0); clrtoeol();
  1566. X+         if (ship->protect.on)
  1567. X+             {
  1568. X+             printw("(p)rotect ship #%d",ship->protect.ship);
  1569. X+             clrtoeol();
  1570. X+         } else {
  1571. X+             printw("(p)rotect off");
  1572. X+             clrtoeol();
  1573. X+             }
  1574. X+     }
  1575. X+     if (can_bombard(ship) || ship->type==OTYPE_GR) {
  1576. X+         move(Lprompty,0); clrtoeol();
  1577. X+         if (ship->protect.planet)
  1578. X+             {
  1579. X+             printw("p(l)anetary defense on");
  1580. X+             clrtoeol();
  1581. X+         } else {
  1582. X+             printw("p(l)anetary defense off");
  1583. X+             clrtoeol();
  1584. X+             }
  1585. X+     }
  1586. X      if (has_switch(ship)) {
  1587. X          move(SWprompty,SWpromptx);
  1588. X          printw("(o)%s", ship->on ? "n" : "ff");
  1589. X***************
  1590. X*** 220,226 ****
  1591. X              ship->type==STYPE_MIRROR ? "i" : "");
  1592. X      else
  1593. X          printw("%s%s ESC?):", has_switch(ship) ? "o" : "",
  1594. X!             ship->type==STYPE_MINE ? "t" : "", ship->type==OTYPE_TRANSDEV ? "t" : "" );
  1595. X  
  1596. X       }
  1597. X  
  1598. X--- 263,271 ----
  1599. X              ship->type==STYPE_MIRROR ? "i" : "");
  1600. X      else
  1601. X          printw("%s%s ESC?):", has_switch(ship) ? "o" : "",
  1602. X!             ship->type==STYPE_MINE ? "t" : "", 
  1603. X!             ship->type==STYPE_MINE ? "m" : "",
  1604. X!             ship->type==OTYPE_TRANSDEV ? "t" : "" );
  1605. X  
  1606. X       }
  1607. X  
  1608. X***************
  1609. X*** 241,247 ****
  1610. X--- 286,371 ----
  1611. X              Mod=0;
  1612. X              touchwin(stdscr);
  1613. X              } break;
  1614. X+         case 'p':
  1615. X+             /* toggle protect option */
  1616. X+         if(can_bombard(ship) || ship->type==OTYPE_GR) {
  1617. X+             ship->protect.on = !ship->protect.on;
  1618. X+             move(Pprompty,0);
  1619. X+             if(ship->protect.on)
  1620. X+                 {
  1621. X+                 printw("(p)rotect s(h)ip #%d",
  1622. X+                 ship->protect.ship); clrtoeol();
  1623. X+             } else  {
  1624. X+                 printw("(p)rotect off"); clrtoeol();
  1625. X+                 }
  1626. X+             }
  1627. X+             break;
  1628. X  
  1629. X+         case 'l':
  1630. X+             /* toggle protect option */
  1631. X+         if(can_bombard(ship) || ship->type == OTYPE_GR) {
  1632. X+             ship->protect.planet = !ship->protect.planet;
  1633. X+             move(Lprompty,0);
  1634. X+             if(ship->protect.planet)
  1635. X+                 {
  1636. X+                 printw("p(l)anetary defense on");
  1637. X+                 clrtoeol();
  1638. X+             } else  {
  1639. X+                 printw("p(l)anetary defense off");
  1640. X+                 clrtoeol();
  1641. X+                 }
  1642. X+             }
  1643. X+             break;
  1644. X+         case 'h':
  1645. X+         if(ship->protect.on) {    
  1646. X+             unsigned i;
  1647. X+             move(Pprompty,Ppromptx); refresh();
  1648. X+             tty_off();
  1649. X+               scanw("%u",&i); 
  1650. X+         if(i != shipno) 
  1651. X+             ship->protect.ship = i;
  1652. X+         else
  1653. X+             printf("you can't `protect' yourself!\n");
  1654. X+             tty_on();
  1655. X+             }
  1656. X+             break;
  1657. X+         case 'n':
  1658. X+             /* toggle navigate option */
  1659. X+         if(can_navigate(ship)) {
  1660. X+             ship->navigate.on = !ship->navigate.on;
  1661. X+             move(Nprompty,0);
  1662. X+             printw("(n)avigate o%s ",ship->navigate.on ? "n : " : "ff");
  1663. X+             clrtoeol();
  1664. X+             if(ship->navigate.on)printw("  (c)ourse %3u    (#) of turns %3u",
  1665. X+                 ship->navigate.bearing,
  1666. X+                 ship->navigate.turns);
  1667. X+ 
  1668. X+             }
  1669. X+             break;
  1670. X+ 
  1671. X+         case '#':
  1672. X+             /* set number of turns for navigate option */
  1673. X+         if(ship->navigate.on) {    
  1674. X+             unsigned i;
  1675. X+             move(Nprompty,Trnpromptx+6); refresh();
  1676. X+             tty_off();
  1677. X+               scanw("%u",&i); 
  1678. X+             ship->navigate.turns = i;
  1679. X+             tty_on();
  1680. X+             }
  1681. X+             break;
  1682. X+ 
  1683. X+         case 'c':
  1684. X+             /* set course for navigate option */
  1685. X+         if(ship->navigate.on) {    unsigned i;
  1686. X+             move(Nprompty,Cpromptx+10); refresh();
  1687. X+             tty_off();
  1688. X+               scanw("%u",&i); 
  1689. X+             ship->navigate.bearing = i;
  1690. X+             tty_on();
  1691. X+             }
  1692. X+             break;
  1693. X+ 
  1694. X          case 'o':
  1695. X              /* on/off switch */
  1696. X              if (has_switch(ship)) {
  1697. X***************
  1698. X*** 281,289 ****
  1699. X                ungetc(c,stdin);
  1700. X                scanw("%43s",s); 
  1701. X                move(Erry,0); refresh();
  1702. X-               Locks(1);
  1703. X                where = Getplace(s, 1);
  1704. X-               Locks(0);
  1705. X                if (!where.err) {
  1706. X              if (where.level==LEVEL_SHIP) {
  1707. X                      ship->destshipno = where.shipno;
  1708. X--- 405,411 ----
  1709. X***************
  1710. X*** 347,352 ****
  1711. X--- 469,483 ----
  1712. X              } else
  1713. X              makerr(c);
  1714. X              break;
  1715. X+         case 'm':
  1716. X+             if (ship->type==STYPE_MINE) {
  1717. X+             move(Tprompty+1,Tpromptx-18);
  1718. X+             clrtoeol();
  1719. X+             refresh();
  1720. X+         if(!ship->mine.mode)printw("(m)ode: radiation");
  1721. X+         if(ship->mine.mode)printw("(m)ode: explosive");
  1722. X+         ship->mine.mode = !ship->mine.mode;
  1723. X+             }
  1724. X  
  1725. X          case 't':
  1726. X              if (ship->type==STYPE_MINE) {
  1727. X***************
  1728. X*** 353,366 ****
  1729. X              move(Tprompty,Tpromptx); clrtoeol();
  1730. X              refresh(); tty_off();
  1731. X  
  1732. X!     ship->orders.object.number = 0;
  1733. X  
  1734. X!             scanw("%hd", &ship->orders.object.number);
  1735. X              tty_on();
  1736. X!             if (ship->orders.object.number < 0)
  1737. X!                 ship->orders.object.number = 0;
  1738. X              move(Tprompty,Tpromptx);
  1739. X!             printw("%d",ship->orders.object.number); clrtoeol();
  1740. X  
  1741. X              } else if (ship->type==OTYPE_TRANSDEV) {
  1742. X  
  1743. X--- 484,497 ----
  1744. X              move(Tprompty,Tpromptx); clrtoeol();
  1745. X              refresh(); tty_off();
  1746. X  
  1747. X!     ship->object.number = 0;
  1748. X  
  1749. X!             scanw("%hd", &ship->object.number);
  1750. X              tty_on();
  1751. X!             if (ship->object.number < 0)
  1752. X!                 ship->object.number = 0;
  1753. X              move(Tprompty,Tpromptx);
  1754. X!             printw("%d",ship->object.number); clrtoeol();
  1755. X  
  1756. X              } else if (ship->type==OTYPE_TRANSDEV) {
  1757. X  
  1758. X***************
  1759. X*** 367,378 ****
  1760. X              move(Tprompty,Tpromptx); clrtoeol();
  1761. X              refresh(); tty_off();
  1762. X  
  1763. X!     ship->orders.object.number = 0;
  1764. X  
  1765. X!             scanw("%hd", &ship->orders.object.number);
  1766. X              tty_on();
  1767. X              move(Tprompty,Tpromptx);
  1768. X!             printw("%d",ship->orders.object.number); clrtoeol();
  1769. X  
  1770. X              } else
  1771. X              makerr(c);
  1772. X--- 498,509 ----
  1773. X              move(Tprompty,Tpromptx); clrtoeol();
  1774. X              refresh(); tty_off();
  1775. X  
  1776. X!     ship->object.number = 0;
  1777. X  
  1778. X!             scanw("%hd", &ship->object.number);
  1779. X              tty_on();
  1780. X              move(Tprompty,Tpromptx);
  1781. X!             printw("%d",ship->object.number); clrtoeol();
  1782. X  
  1783. X              } else
  1784. X              makerr(c);
  1785. X***************
  1786. X*** 393,402 ****
  1787. X                if (pl.err) {
  1788. X                  break;
  1789. X                } else {
  1790. X!                 ship->orders.aimed_at.level = pl.level;
  1791. X!                 ship->orders.aimed_at.pnum = pl.pnum;
  1792. X!                 ship->orders.aimed_at.snum = pl.snum;
  1793. X!                 ship->orders.aimed_at.shipno = pl.shipno;
  1794. X                  if (ship->type!=OTYPE_TRACT && 
  1795. X                          ship->type!=OTYPE_GTELE)
  1796. X                      ship->fuel -= FUEL_MANEUVER;
  1797. X--- 524,533 ----
  1798. X                if (pl.err) {
  1799. X                  break;
  1800. X                } else {
  1801. X!                 ship->aimed_at.level = pl.level;
  1802. X!                 ship->aimed_at.pnum = pl.pnum;
  1803. X!                 ship->aimed_at.snum = pl.snum;
  1804. X!                 ship->aimed_at.shipno = pl.shipno;
  1805. X                  if (ship->type!=OTYPE_TRACT && 
  1806. X                          ship->type!=OTYPE_GTELE)
  1807. X                      ship->fuel -= FUEL_MANEUVER;
  1808. X***************
  1809. X*** 423,437 ****
  1810. X                  if ((c=getchr())!='\n') {
  1811. X                    ungetc(c,stdin);
  1812. X                    scanw("%u",&i); 
  1813. X!                   ship->orders.aimed_at.intensity = i;
  1814. X                    Mod=1;
  1815. X!                   if (ship->orders.aimed_at.intensity>100)
  1816. X!                   ship->orders.aimed_at.intensity=100;
  1817. X!                   else if (ship->orders.aimed_at.intensity<0)
  1818. X!                   ship->orders.aimed_at.intensity=0;
  1819. X                  }
  1820. X                  move(5,14);
  1821. X!                 printw("%3d",ship->orders.aimed_at.intensity); 
  1822. X                  tty_on(); 
  1823. X              } else 
  1824. X              makerr(c);
  1825. X--- 554,568 ----
  1826. X                  if ((c=getchr())!='\n') {
  1827. X                    ungetc(c,stdin);
  1828. X                    scanw("%u",&i); 
  1829. X!                   ship->aimed_at.intensity = i;
  1830. X                    Mod=1;
  1831. X!                   if (ship->aimed_at.intensity>100)
  1832. X!                   ship->aimed_at.intensity=100;
  1833. X!                   else if (ship->aimed_at.intensity<0)
  1834. X!                   ship->aimed_at.intensity=0;
  1835. X                  }
  1836. X                  move(5,14);
  1837. X!                 printw("%3d",ship->aimed_at.intensity); 
  1838. X                  tty_on(); 
  1839. X              } else 
  1840. X              makerr(c);
  1841. X***************
  1842. X*** 441,449 ****
  1843. X              if (can_bombard(ship)) {
  1844. X              move(Bprompty,0);
  1845. X              clrtoeol();
  1846. X!             ship->orders.o.bombard = !ship->orders.o.bombard;
  1847. X              Mod=1;
  1848. X!             if (ship->orders.o.bombard)
  1849. X                 if (ship->whatdest==LEVEL_PLAN)
  1850. X                  printw("(b)OMBARD planet %s", 
  1851. X                      ship->whatdest==LEVEL_PLAN ? 
  1852. X--- 572,580 ----
  1853. X              if (can_bombard(ship)) {
  1854. X              move(Bprompty,0);
  1855. X              clrtoeol();
  1856. X!             ship->bombard = !ship->bombard;
  1857. X              Mod=1;
  1858. X!             if (ship->bombard)
  1859. X                 if (ship->whatdest==LEVEL_PLAN)
  1860. X                  printw("(b)OMBARD planet %s", 
  1861. X                      ship->whatdest==LEVEL_PLAN ? 
  1862. X***************
  1863. X*** 469,474 ****
  1864. X--- 600,606 ----
  1865. X              printw(" o -- turn object on/off\n");
  1866. X              if (ship->type==STYPE_MINE)
  1867. X              printw(" t -- trigger radius\n");
  1868. X+             printw(" m -- change combat mode\n");
  1869. X              if (ship->type==OTYPE_TRANSDEV)
  1870. X              printw(" t -- transporter target\n");
  1871. X              if (can_bombard(ship))
  1872. X***************
  1873. X*** 519,529 ****
  1874. X   planettype *p;
  1875. X   int plan_give_orders_pdata,Planmod=0;
  1876. X  
  1877. X-  Locks(1);    /* we are only looking up data unchanged by the shell */
  1878. X   openpdata(&plan_give_orders_pdata);
  1879. X   getplanet(plan_give_orders_pdata,&p,filepos);
  1880. X   close(plan_give_orders_pdata);
  1881. X-  Locks(0);
  1882. X  
  1883. X   sh = p->ships;
  1884. X   while (sh)
  1885. X--- 651,659 ----
  1886. X***************
  1887. X*** 562,571 ****
  1888. X  {
  1889. X   placetype targ;
  1890. X  
  1891. X!   targ.level = ship->orders.aimed_at.level;
  1892. X!   targ.snum = ship->orders.aimed_at.snum;
  1893. X!   targ.pnum = ship->orders.aimed_at.pnum;
  1894. X!   targ.shipno = ship->orders.aimed_at.shipno;
  1895. X    return Dispplace(&targ);
  1896. X  }
  1897. X  
  1898. X--- 692,701 ----
  1899. X  {
  1900. X   placetype targ;
  1901. X  
  1902. X!   targ.level = ship->aimed_at.level;
  1903. X!   targ.snum = ship->aimed_at.snum;
  1904. X!   targ.pnum = ship->aimed_at.pnum;
  1905. X!   targ.shipno = ship->aimed_at.shipno;
  1906. X    return Dispplace(&targ);
  1907. X  }
  1908. X  
  1909. X***************
  1910. X*** 609,615 ****
  1911. X  int sdata,pdata;
  1912. X  float xf,yf;
  1913. X  
  1914. X!  str = Stars[s->orders.aimed_at.snum];
  1915. X  
  1916. X   if (s->is_docked && s->whatdest==LEVEL_PLAN) {
  1917. X      openpdata(&pdata);
  1918. X--- 739,745 ----
  1919. X  int sdata,pdata;
  1920. X  float xf,yf;
  1921. X  
  1922. X!  str = Stars[s->aimed_at.snum];
  1923. X  
  1924. X   if (s->is_docked && s->whatdest==LEVEL_PLAN) {
  1925. X      openpdata(&pdata);
  1926. X***************
  1927. X*** 623,629 ****
  1928. X      yf = s->ypos;
  1929. X   }
  1930. X  
  1931. X!  switch (s->orders.aimed_at.level) {
  1932. X      case LEVEL_UNIV:
  1933. X          move(Erry,0);
  1934. X          printw("There is nothing out here to aim at.");
  1935. X--- 753,759 ----
  1936. X      yf = s->ypos;
  1937. X   }
  1938. X  
  1939. X!  switch (s->aimed_at.level) {
  1940. X      case LEVEL_UNIV:
  1941. X          move(Erry,0);
  1942. X          printw("There is nothing out here to aim at.");
  1943. X***************
  1944. X*** 633,641 ****
  1945. X          printw("Star %s ", prin_aimed_at(s));
  1946. X          if ((dist=sqrt(Distsq(xf, yf, str->xpos, str->ypos))) <= tele_range(Race, s) ) {
  1947. X              openstardata(&sdata);
  1948. X!             getstar(sdata, &str, s->orders.aimed_at.snum);
  1949. X               setbit(str->explored,Playernum);
  1950. X!             putstar(sdata, str, s->orders.aimed_at.snum);
  1951. X              close(sdata);    /* don't need to care about Stars */
  1952. X              printw("has been surveyed, distance %g.\n",dist);
  1953. X          } else {
  1954. X--- 763,771 ----
  1955. X          printw("Star %s ", prin_aimed_at(s));
  1956. X          if ((dist=sqrt(Distsq(xf, yf, str->xpos, str->ypos))) <= tele_range(Race, s) ) {
  1957. X              openstardata(&sdata);
  1958. X!             getstar(sdata, &str, s->aimed_at.snum);
  1959. X               setbit(str->explored,Playernum);
  1960. X!             putstar(sdata, str, s->aimed_at.snum);
  1961. X              close(sdata);    /* don't need to care about Stars */
  1962. X              printw("has been surveyed, distance %g.\n",dist);
  1963. X          } else {
  1964. X***************
  1965. X*** 647,657 ****
  1966. X          move(Erry,0);
  1967. X          printw("Planet %s ", prin_aimed_at(s));
  1968. X          openpdata(&pdata);
  1969. X!         getplanet(pdata, &p, str->planetpos[s->orders.aimed_at.pnum]);
  1970. X          if ((dist=sqrt(Distsq(xf, yf, str->xpos+p->xpos, str->ypos+p->ypos))) <= tele_range(Race, s) ) {
  1971. X              setbit(str->explored,Playernum);
  1972. X              p->info[Playernum-1].explored = 1;
  1973. X!             putplanet(pdata, p, str->planetpos[s->orders.aimed_at.pnum]);
  1974. X              free(p);
  1975. X              printw("has been surveyed, distance %g.\n", dist);
  1976. X          } else {
  1977. X--- 777,787 ----
  1978. X          move(Erry,0);
  1979. X          printw("Planet %s ", prin_aimed_at(s));
  1980. X          openpdata(&pdata);
  1981. X!         getplanet(pdata, &p, str->planetpos[s->aimed_at.pnum]);
  1982. X          if ((dist=sqrt(Distsq(xf, yf, str->xpos+p->xpos, str->ypos+p->ypos))) <= tele_range(Race, s) ) {
  1983. X              setbit(str->explored,Playernum);
  1984. X              p->info[Playernum-1].explored = 1;
  1985. X!             putplanet(pdata, p, str->planetpos[s->aimed_at.pnum]);
  1986. X              free(p);
  1987. X              printw("has been surveyed, distance %g.\n", dist);
  1988. X          } else {
  1989. X*** /dev/null    Fri Sep 15 08:30:02 1989
  1990. X--- patchlevel.h    Fri Sep 15 08:33:35 1989
  1991. X***************
  1992. X*** 0 ****
  1993. X--- 1 ----
  1994. X+ #define PATCHLEVEL    1
  1995. END_OF_FILE
  1996. if test 50119 -ne `wc -c <'patches01c'`; then
  1997.     echo shar: \"'patches01c'\" unpacked with wrong size!
  1998. fi
  1999. # end of 'patches01c'
  2000. fi
  2001. echo shar: End of archive 3 \(of 4\).
  2002. cp /dev/null ark3isdone
  2003. MISSING=""
  2004. for I in 1 2 3 4 ; do
  2005.     if test ! -f ark${I}isdone ; then
  2006.     MISSING="${MISSING} ${I}"
  2007.     fi
  2008. done
  2009. if test "${MISSING}" = "" ; then
  2010.     echo You have unpacked all 4 archives.
  2011.     rm -f ark[1-9]isdone
  2012. else
  2013.     echo You still need to unpack the following archives:
  2014.     echo "        " ${MISSING}
  2015. fi
  2016. ##  End of shell archive.
  2017. exit 0
  2018.